home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / etc / sample.emacs < prev    next >
Encoding:
Text File  |  1995-08-26  |  22.5 KB  |  581 lines

  1. ;;; -*- Mode: Emacs-Lisp -*-
  2.  
  3. ;;; This is a sample .emacs file.
  4. ;;;
  5. ;;; The .emacs file, which should reside in your home directory, allows you to
  6. ;;; customize the behavior of Emacs.  In general, changes to your .emacs file
  7. ;;; will not take effect until the next time you start up Emacs.  You can load
  8. ;;; it explicitly with `M-x load-file RET ~/.emacs RET'.
  9. ;;;
  10. ;;; There is a great deal of documentation on customization in the Emacs
  11. ;;; manual.  You can read this manual with the online Info browser: type
  12. ;;; `C-h i' or select "Emacs Info" from the "Help" menu.
  13.  
  14.  
  15. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  16. ;;            Basic Customization                ;;
  17. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  18.  
  19. ;; Enable the commands `narrow-to-region' ("C-x n n") and 
  20. ;; `eval-expression' ("M-ESC", or "ESC ESC").  Both are useful
  21. ;; commands, but they can be confusing for a new user, so they're
  22. ;; disabled by default.
  23. (put 'narrow-to-region 'disabled nil)
  24. (put 'eval-expression 'disabled nil)
  25.  
  26. ;;; Define a variable to indicate whether we're running XEmacs/Lucid Emacs.
  27. ;;; (You do not have to defvar a global variable before using it --
  28. ;;; you can just call `setq' directly like we do for `emacs-major-version'
  29. ;;; below.  It's clearer this way, though.)
  30.  
  31. (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
  32.  
  33. ;; Make the sequence "C-x w" execute the `what-line' command, 
  34. ;; which prints the current line number in the echo area.
  35. (global-set-key "\C-xw" 'what-line)
  36.  
  37. ;; set up the function keys to do common tasks to reduce Emacs pinky
  38. ;; and such.
  39.  
  40. ;; Make F1 invoke help
  41. (global-set-key 'f1 'help-command)
  42. ;; Make F2 be `undo'
  43. (global-set-key 'f2 'undo)
  44. ;; Make F3 be `find-file'
  45. ;; Note: it does not currently work to say
  46. ;;   (global-set-key 'f3 "\C-x\C-f")
  47. ;; The reason is that macros can't do interactive things properly.
  48. ;; This is an extremely longstanding bug in Emacs.  Eventually,
  49. ;; it will be fixed. (Hopefully ..)
  50. (global-set-key 'f3 'find-file)
  51.  
  52. ;; Make F4 be "mark", F5 be "copy", F6 be "paste"
  53. ;; Note that you can set a key sequence either to a command or to another
  54. ;; key sequence.
  55. (global-set-key 'f4 'set-mark-command)
  56. (global-set-key 'f5 "\M-w")
  57. (global-set-key 'f6 "\C-y")
  58.  
  59. ;; Shift-F4 is "pop mark off of stack"
  60. (global-set-key '(shift f4) (lambda () (interactive) (set-mark-command t)))
  61.  
  62. ;; Make F7 be `save-buffer'
  63. (global-set-key 'f7 'save-buffer)
  64.  
  65. ;; Make F8 be "start macro", F9 be "end macro", F10 be "execute macro"
  66. (global-set-key 'f8 'start-kbd-macro)
  67. (global-set-key 'f9 'end-kbd-macro)
  68. (global-set-key 'f10 'call-last-kbd-macro)
  69.  
  70. ;; Here's an alternative binding if you don't use keyboard macros:
  71. ;; Make F8 be `save-buffer' followed by `delete-window'.
  72. ;;(global-set-key 'f8 "\C-x\C-s\C-x0")
  73.  
  74. ;; If you prefer delete to actually delete forward then you want to
  75. ;; uncomment the next line.
  76. ;; (load-library "delbackspace")
  77.  
  78.  
  79. (cond (running-xemacs
  80.        ;;
  81.        ;; Code for any version of XEmacs/Lucid Emacs goes here
  82.        ;;
  83.  
  84.        ;; Change the values of some variables.
  85.        ;; (t means true; nil means false.)
  86.        ;;
  87.        ;; Use the "Describe Variable..." option on the "Help" menu
  88.        ;; to find out what these variables mean.
  89.        (setq find-file-use-truenames nil
  90.          find-file-compare-truenames t
  91.          minibuffer-confirm-incomplete t
  92.          complex-buffers-menu-p t
  93.          next-line-add-newlines nil
  94.          mail-yank-prefix "> "
  95.          kill-whole-line t
  96.          )
  97.  
  98.        ;; When running ispell, consider all 1-3 character words as correct.
  99.        (setq ispell-extra-args '("-W" "3"))
  100.  
  101.        ;; Change the way the buffer name is displayed in the
  102.        ;; modeline.  The variable for this is called
  103.        ;; 'modeline-buffer-identification but was called
  104.        ;; 'mode-line-buffer-identification in older XEmacsen.
  105.        (if (boundp 'modeline-buffer-identification)
  106.        ;; Note that if you want to put more than one form in the
  107.        ;; `THEN' clause of an IF-THEN-ELSE construct, you have to
  108.        ;; surround the forms with `progn'.  You don't have to
  109.        ;; do this for the `ELSE' clause.
  110.        (progn
  111.          (setq-default modeline-buffer-identification '("XEmacs: %17b"))
  112.          (setq modeline-buffer-identification '("XEmacs: %17b")))
  113.      (setq-default mode-line-buffer-identification '("XEmacs: %17b"))
  114.      (setq mode-line-buffer-identification '("XEmacs: %17b")))
  115.  
  116.        (cond ((or (not (fboundp 'device-type))
  117.           (equal (device-type) 'x))
  118.           ;;
  119.           ;; Code which applies only when running emacs under X goes here.
  120.           ;; (We check whether the function `device-type' exists
  121.           ;; before using it.  In versions before 19.12, there
  122.           ;; was no such function.  If it doesn't exist, we
  123.           ;; simply assume we're running under X -- versions before
  124.           ;; 19.12 only supported X.)
  125.  
  126.           ;; Remove the binding of C-x C-c, which normally exits emacs.
  127.           ;; It's easy to hit this by mistake, and that can be annoying.
  128.           ;; Under X, you can always quit with the "Exit Emacs" option on
  129.           ;; the File menu.
  130.           (global-set-key "\C-x\C-c" nil)
  131.  
  132.           ;; Uncomment this to enable "sticky modifier keys" in 19.13
  133.           ;; and up.  With sticky modifier keys enabled, you can
  134.           ;; press and release a modifier key before pressing the
  135.           ;; key to be modified, like how the ESC key works always.
  136.           ;; If you hold the modifier key down, however, you still
  137.           ;; get the standard behavior.  I personally think this
  138.           ;; is the best thing since sliced bread (and a *major*
  139.           ;; win when it comes to reducing Emacs pinky), but it's
  140.           ;; disorienting at first so I'm not enabling it here by
  141.           ;; default.
  142.  
  143.           ;;(setq modifier-keys-are-sticky t)
  144.  
  145.           ;; This changes the variable which controls the text that goes
  146.           ;; in the top window title bar.  (However, it is not changed
  147.           ;; unless it currently has the default value, to avoid
  148.           ;; interfering with a -wn command line argument I may have
  149.           ;; started emacs with.)
  150.           (if (equal frame-title-format "%S: %b")
  151.           (setq frame-title-format
  152.             (concat "%S: " invocation-directory invocation-name
  153.                 " [" emacs-version "]"
  154.                 (if nil ; (getenv "NCD")
  155.                     ""
  156.                   "   %b"))))
  157.  
  158.           ;; If we're running on display 0, load some nifty sounds that
  159.           ;; will replace the default beep.  But if we're running on a
  160.           ;; display other than 0, which probably means my NCD X terminal,
  161.           ;; which can't play digitized sounds, do two things: reduce the
  162.           ;; beep volume a bit, and change the pitch of the sound that is
  163.           ;; made for "no completions."
  164.           ;;
  165.           ;; (Note that sampled sounds only work if XEmacs was compiled
  166.           ;; with sound support, and we're running on the console of a
  167.           ;; Sparc, HP, or SGI machine, or on a machine which has a
  168.           ;; NetAudio server; otherwise, you just get the standard beep.)
  169.           ;;
  170.           ;; (Note further that changing the pitch and duration of the
  171.           ;; standard beep only works with some X servers; many servers
  172.           ;; completely ignore those parameters.)
  173.           ;;
  174.           (cond ((string-match ":0" (getenv "DISPLAY"))
  175.              (load-default-sounds))
  176.             (t
  177.              (setq bell-volume 40)
  178.              (setq sound-alist
  179.                (append sound-alist '((no-completion :pitch 500))))
  180.              ))
  181.  
  182.           ;; Make `C-x C-m' and `C-x RET' be different (since I tend
  183.           ;; to type the latter by accident sometimes.)
  184.           (define-key global-map [(control x) return] nil)
  185.  
  186.           ;; Change the cursor used when the mouse is over a mode line
  187.           (setq x-mode-pointer-shape "leftbutton")
  188.  
  189.           ;; Change the cursor used during garbage collection.
  190.           ;;
  191.           ;; Note that this cursor image is rather large as cursors go,
  192.           ;; and so it won't work on some X servers (such as the MIT
  193.           ;; R5 Sun server) because servers may have lamentably small
  194.           ;; upper limits on cursor size.
  195.           ;;(if (featurep 'xpm)
  196.           ;;   (setq x-gc-pointer-shape
  197.           ;;     (expand-file-name "trash.xpm" data-directory)))
  198.  
  199.           ;; Here's another way to do that: it first tries to load the
  200.           ;; cursor once and traps the error, just to see if it's
  201.           ;; possible to load that cursor on this system; if it is,
  202.           ;; then it sets x-gc-pointer-shape, because we knows that
  203.           ;; will work.  Otherwise, it doesn't change that variable
  204.           ;; because we know it will just cause some error messages.
  205.           (if (featurep 'xpm)
  206.           (let ((file (expand-file-name "recycle.xpm" data-directory)))
  207.             (if (condition-case error
  208.                 (make-cursor file) ;returns a cursor if successful.
  209.               (error nil))        ; returns nil if an error occurred.
  210.             (setq x-gc-pointer-shape file))))
  211.      
  212.           ;; Add `dired' to the File menu
  213.           (add-menu-item '("File") "Edit Directory" 'dired t)
  214.  
  215.           ;; Here's a way to add scrollbar-like buttons to the menubar
  216.           (add-menu-item nil "Top" 'beginning-of-buffer t)
  217.           (add-menu-item nil "<<<" 'scroll-down t)
  218.           (add-menu-item nil " . " 'recenter t)
  219.           (add-menu-item nil ">>>" 'scroll-up t)
  220.           (add-menu-item nil "Bot" 'end-of-buffer t)
  221.           
  222.           ;; Change the behavior of mouse button 2 (which is normally
  223.           ;; bound to `mouse-yank'), so that it inserts the selected text
  224.           ;; at point (where the text cursor is), instead of at the
  225.           ;; position clicked.
  226.           ;;
  227.           ;; Note that you can find out what a particular key sequence or
  228.           ;; mouse button does by using the "Describe Key..." option on
  229.           ;; the Help menu.
  230.           (setq mouse-yank-at-point t)
  231.  
  232.           ;; When editing C code (and Lisp code and the like), I often
  233.           ;; like to insert tabs into comments and such.  It gets to be
  234.           ;; a pain to always have to use `C-q TAB', so I set up a more
  235.           ;; convenient binding.  Note that this does not work in
  236.           ;; TTY frames.
  237.           (define-key global-map '(shift tab) 'self-insert-command)
  238.  
  239.           ;; LISPM bindings of Control-Shift-C and Control-Shift-E.
  240.           ;; Note that "\C-C" means Control-C, not Control-Shift-C.
  241.           ;; To specify shifted control characters, you must use the
  242.           ;; more verbose syntax used here.
  243.           (define-key emacs-lisp-mode-map '(control C) 'compile-defun)
  244.           (define-key emacs-lisp-mode-map '(control E) 'eval-defun)
  245.  
  246.           ;; If you like the FSF Emacs binding of button3 (single-click
  247.           ;; extends the selection, double-click kills the selection),
  248.           ;; uncomment the following:
  249.  
  250.           ;; Under 19.13, the following is enough:
  251.               ;(define-key global-map 'button3 'mouse-track-adjust)
  252.  
  253.           ;; But under 19.12, you need this:
  254.               ;(define-key global-map 'button3
  255.               ;    (lambda (event)
  256.               ;      (interactive "e")
  257.               ;      (let ((default-mouse-track-adjust t))
  258.               ;        (mouse-track event))))
  259.  
  260.           ;; Under both 19.12 and 19.13, you also need this:
  261.               ;(add-hook 'mouse-track-click-hook
  262.               ;          (lambda (event count)
  263.               ;            (if (or (/= (event-button event) 3)
  264.               ;                    (/= count 2))
  265.               ;                nil ;; do the normal operation
  266.               ;              (kill-region (point) (mark))
  267.               ;              t ;; don't do the normal operations.
  268.               ;              )))
  269.  
  270.  
  271.           ))
  272.  
  273.        ))
  274.  
  275. ;;; Older versions of emacs did not have these variables
  276. ;;; (emacs-major-version and emacs-minor-version.)
  277. ;;; Let's define them if they're not around, since they make
  278. ;;; it much easier to conditionalize on the emacs version.
  279.  
  280. (if (and (not (boundp 'emacs-major-version))
  281.      (string-match "^[0-9]+" emacs-version))
  282.     (setq emacs-major-version
  283.       (string-to-int (substring emacs-version
  284.                     (match-beginning 0) (match-end 0)))))
  285. (if (and (not (boundp 'emacs-minor-version))
  286.      (string-match "^[0-9]+\\.\\([0-9]+\\)" emacs-version))
  287.     (setq emacs-minor-version
  288.       (string-to-int (substring emacs-version
  289.                     (match-beginning 1) (match-end 1)))))
  290.  
  291. ;;; Define a function to make it easier to check which version we're
  292. ;;; running.
  293.  
  294. (defun running-emacs-version-or-newer (major minor)
  295.   (or (> emacs-major-version major)
  296.       (and (= emacs-major-version major)
  297.        (>= emacs-minor-version minor))))
  298.  
  299. (cond ((and running-xemacs
  300.         (running-emacs-version-or-newer 19 6))
  301.        ;;
  302.        ;; Code requiring XEmacs/Lucid Emacs version 19.6 or newer goes here
  303.        ;;
  304.        ))
  305.  
  306. (cond ((>= emacs-major-version 19)
  307.        ;;
  308.        ;; Code for any vintage-19 emacs goes here
  309.        ;;
  310.        ))
  311.  
  312. (cond ((and (not running-xemacs)
  313.         (>= emacs-major-version 19))
  314.        ;;
  315.        ;; Code specific to FSF Emacs 19 (not XEmacs/Lucid Emacs) goes here
  316.        ;;
  317.        ))
  318.  
  319. (cond ((< emacs-major-version 19)
  320.        ;;
  321.        ;; Code specific to emacs 18 goes here
  322.        ;;
  323.        ))
  324.  
  325.  
  326. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  327. ;;        Customization of Specific Packages            ;;
  328. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  329.  
  330.  
  331. ;;; ********************
  332. ;;; Load ange-ftp, which uses the FTP protocol as a pseudo-filesystem.
  333. ;;; When this is loaded, the pathname syntax /user@host:/remote/path
  334. ;;; refers to files accessible through ftp.
  335. ;;;
  336. (require 'dired)
  337. (require 'ange-ftp)
  338. (setq ange-ftp-default-user "anonymous"      ; id to use for /host:/remote/path
  339.       ange-ftp-generate-anonymous-password t ; use $USER@`hostname`
  340.       ange-ftp-binary-file-name-regexp "."   ; always transfer in binary mode
  341.       )
  342.  
  343.  
  344. ;;; ********************
  345. ;;; Load the auto-save.el package, which lets you put all of your autosave
  346. ;;; files in one place, instead of scattering them around the file system.
  347. ;;;
  348. (require 'auto-save)
  349. (setq auto-save-directory (expand-file-name "~/autosaves/")
  350.       auto-save-directory-fallback auto-save-directory
  351.       auto-save-hash-p nil
  352.       ange-ftp-auto-save t
  353.       ange-ftp-auto-save-remotely nil
  354.       ;; now that we have auto-save-timeout, let's crank this up
  355.       ;; for better interactive response.
  356.       auto-save-interval 2000
  357.       )
  358.  
  359. ;; This adds additional extensions which indicate files normally
  360. ;; handled by cc-mode.
  361. (setq auto-mode-alist
  362.       (append '(("\\.C$"  . c++-mode)
  363.         ("\\.cc$" . c++-mode)
  364.         ("\\.hh$" . c++-mode)
  365.         ("\\.c$"  . c-mode)
  366.         ("\\.h$"  . c-mode))
  367.           auto-mode-alist))
  368.  
  369.  
  370. ;;; ********************
  371. ;;; cc-mode (the mode you're in when editing C, C++, and Objective C files)
  372.  
  373. ;; Tell cc-mode not to check for old-style (K&R) function declarations.
  374. ;; This speeds up indenting a lot.
  375. (setq c-recognize-knr-p nil)
  376.  
  377. ;; Change the indentation amount to 4 spaces instead of 2.
  378. ;; You have to do it in this complicated way because of the
  379. ;; strange way the cc-mode initializes the value of `c-basic-offset'.
  380. (add-hook 'c-mode-hook (lambda () (setq c-basic-offset 4)))
  381.  
  382.  
  383. ;;; ********************
  384. ;;; Load a partial-completion mechanism, which makes minibuffer completion
  385. ;;; search multiple words instead of just prefixes; for example, the command
  386. ;;; `M-x byte-compile-and-load-file RET' can be abbreviated as `M-x b-c-a RET'
  387. ;;; because there are no other commands whose first three words begin with
  388. ;;; the letters `b', `c', and `a' respectively.
  389. ;;;
  390. (load-library "completer")
  391.  
  392.  
  393. ;;; ********************
  394. ;;; Load crypt, which is a package for automatically decoding and reencoding
  395. ;;; files by various methods - for example, you can visit a .Z or .gz file,
  396. ;;; edit it, and have it automatically re-compressed when you save it again.
  397. ;;; 
  398. (setq crypt-encryption-type 'pgp   ; default encryption mechanism
  399.       crypt-confirm-password t       ; make sure new passwords are correct
  400.       ;crypt-never-ever-decrypt t  ; if you don't encrypt anything, set this to
  401.                    ; tell it not to assume that "binary" files
  402.                    ; are encrypted and require a password.
  403.       )
  404. (require 'crypt)
  405.  
  406.  
  407. ;;; ********************
  408. ;;; Edebug is a source-level debugger for emacs-lisp programs.
  409. ;;;
  410. (define-key emacs-lisp-mode-map "\C-xx" 'edebug-defun)
  411.  
  412.  
  413. ;;; ********************
  414. ;;; Font-Lock is a syntax-highlighting package.  When it is enabled and you
  415. ;;; are editing a program, different parts of your program will appear in
  416. ;;; different fonts or colors.  For example, with the code below, comments
  417. ;;; appear in red italics, function names in function definitions appear in
  418. ;;; blue bold, etc.  The code below will cause font-lock to automatically be
  419. ;;; enabled when you edit C, C++, Emacs-Lisp, and many other kinds of
  420. ;;; programs.
  421. ;;;
  422. ;;; The "Options" menu has some commands for controlling this as well.
  423. ;;;
  424. (cond (running-xemacs
  425.  
  426.        ;; If you want the default colors, you could do this:
  427.        ;; (setq font-lock-use-default-fonts nil)
  428.        ;; (setq font-lock-use-default-colors t)
  429.        ;; but I want to specify my own colors, so I turn off all
  430.        ;; default values.
  431.        (setq font-lock-use-default-fonts nil)
  432.        (setq font-lock-use-default-colors nil)
  433.  
  434.        (require 'font-lock)
  435.  
  436.        ;; Mess around with the faces a bit.  Note that you have
  437.        ;; to change the font-lock-use-default-* variables *before*
  438.        ;; loading font-lock, and wait till *after* loading font-lock
  439.        ;; to customize the faces.
  440.  
  441.        ;; string face is green
  442.        (set-face-foreground 'font-lock-string-face "forest green")
  443.  
  444.        ;; comments are italic and red; doc strings are italic
  445.        ;;
  446.        ;; (I use copy-face instead of make-face-italic/make-face-bold
  447.        ;; because the startup code does intelligent things to the
  448.        ;; 'italic and 'bold faces to ensure that they are different
  449.        ;; from the default face.  For example, if the default face
  450.        ;; is bold, then the 'bold face will be unbold.)
  451.        (copy-face 'italic 'font-lock-comment-face)
  452.        ;; Underling comments looks terrible on tty's
  453.        (set-face-underline-p 'font-lock-comment-face nil 'global 'tty)
  454.        (set-face-highlight-p 'font-lock-comment-face t 'global 'tty)
  455.        (copy-face 'font-lock-comment-face 'font-lock-doc-string-face)
  456.        (set-face-foreground 'font-lock-comment-face "red")
  457.  
  458.        ;; function names are bold and blue
  459.        (copy-face 'bold 'font-lock-function-name-face)
  460.        (set-face-foreground 'font-lock-function-name-face "blue")
  461.  
  462.        ;; misc. faces
  463.        (and (find-face 'font-lock-preprocessor-face) ; 19.13 and above
  464.             (copy-face 'bold 'font-lock-preprocessor-face))
  465.        (copy-face 'italic 'font-lock-type-face)
  466.        (copy-face 'bold 'font-lock-keyword-face)
  467.        ))
  468.  
  469.  
  470. ;;; ********************
  471. ;;; fast-lock is a package which speeds up the highlighting of files
  472. ;;; by saving information about a font-locked buffer to a file and
  473. ;;; loading that information when the file is loaded again.  This
  474. ;;; requires a little extra disk space be used.
  475. ;;;
  476. ;;; Normally fast-lock puts the cache file (the filename appended with
  477. ;;; .flc) in the same directory as the file it caches.  You can
  478. ;;; specify an alternate directory to use by setting the variable
  479. ;;; fast-lock-cache-directories.
  480.  
  481. ;; Let's use lazy-lock instead.
  482. ;;(add-hook 'font-lock-mode-hook 'turn-on-fast-lock)
  483. ;;(setq fast-lock-cache-directories '("/foo/bar/baz"))
  484.  
  485.  
  486. ;;; ********************
  487. ;;; lazy-lock is a package which speeds up the highlighting of files
  488. ;;; by doing it "on-the-fly" -- only the visible portion of the
  489. ;;; buffer is fontified.  The results may not always be quite as
  490. ;;; accurate as using full font-lock or fast-lock, but it's *much*
  491. ;;; faster.  No more annoying pauses when you load files.
  492.  
  493. (add-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
  494. ;; I personally don't like "stealth mode" (where lazy-lock starts
  495. ;; fontifying in the background if you're idle for 30 seconds)
  496. ;; because it takes too long to wake up again on my piddly Sparc 1+.
  497. (setq lazy-lock-stealth-time nil)
  498.  
  499.  
  500. ;;; ********************
  501. ;;; func-menu is a package that scans your source file for function
  502. ;;; definitions and makes a menubar entry that lets you jump to any
  503. ;;; particular function definition by selecting it from the menu.  The
  504. ;;; following code turns this on for all of the recognized languages.
  505. ;;; Scanning the buffer takes some time, but not much.
  506. ;;;
  507. ;;; Send bug reports, enhancements etc to:
  508. ;;; David Hughes <ukchugd@ukpmr.cs.philips.nl>
  509. ;;;
  510. (cond (running-xemacs
  511.        (require 'func-menu)
  512.        (define-key global-map 'f8 'function-menu)
  513.        (add-hook 'find-file-hooks 'fume-add-menubar-entry)
  514.        (define-key global-map "\C-cl" 'fume-list-functions)
  515.        (define-key global-map "\C-cg" 'fume-prompt-function-goto)
  516.  
  517.        ;; The Hyperbole information manager package uses (shift button2) and
  518.        ;; (shift button3) to provide context-sensitive mouse keys.  If you
  519.        ;; use this next binding, it will conflict with Hyperbole's setup.
  520.        ;; Choose another mouse key if you use Hyperbole.
  521.        (define-key global-map '(shift button3) 'mouse-function-menu)
  522.  
  523.        ;; For descriptions of the following user-customizable variables,
  524.        ;; type C-h v <variable>
  525.        (setq fume-max-items 25
  526.              fume-fn-window-position 3
  527.              fume-auto-position-popup t
  528.              fume-display-in-modeline-p t
  529.              fume-menubar-menu-location "File"
  530.              fume-buffer-name "*Function List*"
  531.              fume-no-prompt-on-valid-default nil)
  532.        ))
  533.  
  534.  
  535. ;;; ********************
  536. ;;; MH is a mail-reading system from the Rand Corporation that relies on a
  537. ;;; number of external filter programs (which do not come with emacs.)
  538. ;;; Emacs provides a nice front-end onto MH, called "mh-e".
  539. ;;;
  540. ;; Bindings that let you send or read mail using MH
  541. ;(global-set-key "\C-xm" 'mh-smail)
  542. ;(global-set-key "\C-x4m" 'mh-smail-other-window)
  543. ;(global-set-key "\C-cr" 'mh-rmail)
  544.  
  545. ;; Customization of MH behavior.
  546. (setq mh-delete-yanked-msg-window t)
  547. (setq mh-yank-from-start-of-msg 'body)
  548. (setq mh-summary-height 11)
  549.  
  550. ;; Use lines like the following if your version of MH
  551. ;; is in a special place.
  552. ;(setq mh-progs "/usr/dist/pkgs/mh/bin.svr4/")
  553. ;(setq mh-lib "/usr/dist/pkgs/mh/lib.svr4/")
  554.  
  555.  
  556. ;;; ********************
  557. ;;; resize-minibuffer-mode makes the minibuffer automatically
  558. ;;; resize as necessary when it's too big to hold its contents.
  559.  
  560. (autoload 'resize-minibuffer-mode "rsz-minibuf" nil t)
  561. (resize-minibuffer-mode)
  562. (setq resize-minibuffer-window-exactly nil)
  563.  
  564.  
  565. ;;; ********************
  566. ;;; W3 is a browser for the World Wide Web, and takes advantage of the very
  567. ;;; latest redisplay features in XEmacs.  You can access it simply by typing 
  568. ;;; 'M-x w3'; however, if you're unlucky enough to be on a machine that is 
  569. ;;; behind a firewall, you will have to do something like this first:
  570.  
  571. ;(setq w3-use-telnet t
  572. ;      ;;
  573. ;      ;; If the Telnet program you use to access the outside world is
  574. ;      ;; not called "telnet", specify its name like this.
  575. ;      w3-telnet-prog "itelnet"
  576. ;      ;;
  577. ;      ;; If your Telnet program adds lines of junk at the beginning
  578. ;      ;; of the session, specify the number of lines here.
  579. ;      w3-telnet-header-length 4
  580. ;      )
  581.